using System.Web;

namespace SlickGridNet
{
	/// <summary>
	/// Resource item
	/// </summary>
	public class ResourceItem
	{
		private readonly string _path;

		/// <summary>
		/// Initializes a new instance of the SlickGridNet.ResourceItem class with the <paramref name="path"/> to the resource file
		/// </summary>
		/// <param name="path">path to the resource file</param>
		public ResourceItem(string path)
		{
			_path = path;
		}

		/// <summary>
		/// Absolute path to the resource file
		/// </summary>
		public string AbsolutePath
		{
			get { return VirtualPathUtility.IsAbsolute(_path) ? _path : VirtualPathUtility.ToAbsolute(_path); }
		}
	}
}